import { AxiosRequestConfig } from 'axios'

export type Fun = (...arg: any[]) => any

export interface InterfaceItem {
  name: string
  url: string
  method?: 'get' | 'post' | 'request' | 'put' | 'delete' | 'patch' | 'options' | 'head'
  params?: any
  config?: AxiosRequestConfig
  isInit?: boolean // 立即获取
  responseFormate?: (res: any) => any // 返回值处理
}

export type CacheApiName = 'cache_areaTree'

export interface CacheApi extends InterfaceItem {
  name: CacheApiName
}
